﻿@model IEnumerable<thailandProject.Models.PROPERTY>

@{
    ViewBag.Title = "ViewAllProperties";
}

<h2>ViewAllProperties</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
            propName
        </th>
        <th>
            propDetails
        </th>
        <th>
            propHyperlink
        </th>
        <th>
            propLocation
        </th>
        <th>
            propSqFt
        </th>
        <th>
            propGym
        </th>
        <th>
            propParking
        </th>
        <th>
            propPool
        </th>
        <th>
            propWiFi
        </th>
        <th>
            propSauna
        </th>
        <th>
            propType
        </th>
        <th>
            propBedrooms
        </th>
        <th>
            propBaths
        </th>
        <th>
            propPetsAllowed
        </th>
        <th>
            propSmoking
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.propName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.propDetails)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.propHyperlink)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.propLocation)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.propSqFt)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.propGym)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.propParking)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.propPool)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.propWiFi)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.propSauna)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.propType)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.propBedrooms)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.propBaths)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.propPetsAllowed)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.propSmoking)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.propID }) |
            @Html.ActionLink("Details", "Details", new { id=item.propID }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.propID })
        </td>
    </tr>
}

</table>
